package pro.shuangxi.autoconfigure;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

@Configuration
//@ConditionalOnClass({DispatcherServlet.class})//当指定类在classpath能找到
//@ConditionalOnSingleCandidate(DataSource.class)//表示当指定Bean在容器中只有一个
@EnableConfigurationProperties({DevHelperProperties.class})//使使用 @ConfigurationProperties 注解的类生效
public class DevHelperAutoConfiguration {

    @ConditionalOnProperty(prefix = "shuangxi.helper",name = "open",havingValue = "true")
    public void sqlSessionFactory(DataSource dataSource) throws Exception {

    }
}
